
package org.springxrsk.modules.schedule.wrapper;

import org.springxrsk.core.mp.support.BaseEntityWrapper;
import org.springxrsk.core.tool.utils.BeanUtil;
import org.springxrsk.modules.schedule.pojo.entity.QyPreBookEntity;
import org.springxrsk.modules.schedule.pojo.vo.QyPreBookVO;
import java.util.Objects;

/**
 * 预约 包装类,返回视图层所需的字段
 *
 *  @author
 * @since 2024-06-15
 */
public class QyPreBookWrapper extends BaseEntityWrapper<QyPreBookEntity, QyPreBookVO>  {

	public static QyPreBookWrapper build() {
		return new QyPreBookWrapper();
 	}

	@Override
	public QyPreBookVO entityVO(QyPreBookEntity qyPreBook) {
		QyPreBookVO qyPreBookVO = Objects.requireNonNull(BeanUtil.copyProperties(qyPreBook, QyPreBookVO.class));

		//User createUser = UserCache.getUser(qyPreBook.getCreateUser());
		//User updateUser = UserCache.getUser(qyPreBook.getUpdateUser());
		//qyPreBookVO.setCreateUserName(createUser.getName());
		//qyPreBookVO.setUpdateUserName(updateUser.getName());

		return qyPreBookVO;
	}


}
